<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
                <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>
<div>
    <ul class="nav nav-tabs">
        <li role="presentation"><a href="{% url 'allinfo' %}">全部学生信息</a></li>
        <li role="presentation"><a href="{% url 'alltask' %}">全部任务</a></li>
        <li role="presentation" class="active"><a href="{% url 'addtask' %}">添加任务</a></li>
        <li role="presentation"><a href="{% url 'lsupdate' %}">修改学生信息</a></li>
        <li role="presentation"><a href="{% url 'wcqk' %}">学生完成情况</a></li>
        <li role="presentation"><a href="{% url 'login' %}">退出</a></li>
    </ul>
</div>

<script language="javascript">
function save(){
    document.form1.action={% url 'addtask' %};
    document.form1.submit();
}
function send(){
    document.form1.action={% url 'xz' %};
    document.form1.submit();
}
</script>
<form action="" method="post" class="form1" name="form1">
    任务：<br>
    <textarea name="renwu" class="form-control" rows="3"></textarea>
    <input type="button" id="btn" class="btn btn-lg btn-primary btn-block" onclick="save();" value="添加到全部任务">


    <input type="button" id="btn2" class="btn btn-lg btn-primary btn-block" onclick="send();" value="添加给指定学生">
    {{ err }}

</form>


</body>
</html>